FragmentTransaction
Static library support version of the framework's android.app.FragmentTransaction. Used to write apps that run on platforms prior to Android 3.0. When running on Android 3.0 or above, this implementation is still used; it does not try to switch to the framework's implementation. See the framework SDK documentation for a class overview.
Properties
Link copied to clipboard
Bit mask that is set for all enter transitions.
Link copied to clipboard
Bit mask that is set for all exit transitions.
Link copied to clipboard
Fragment is being removed from the stack
Link copied to clipboard
Fragment should simply fade in or out; that is, no strong navigation associated with it except that it is appearing or disappearing for some reason.
Link copied to clipboard
Fragment is being removed from the stack with Activity close transition.
Link copied to clipboard
Fragment is being added onto the stack with Activity open transition.
Link copied to clipboard
Fragment is being added onto the stack
Link copied to clipboard
No animation for transition.
Link copied to clipboard
Not set up for a transition.
Functions
Link copied to clipboard
fun add(@NonNull fragmentClass: Class<out Fragment>, @Nullable args: Bundle, @Nullable tag: String): FragmentTransaction
Calls add with a 0 containerViewId.
fun add(@IdRes containerViewId: Int, @NonNull fragmentClass: Class<out Fragment>, @Nullable args: Bundle): FragmentTransaction
Calls add with a null tag.
fun add(@NonNull container: ViewGroup, @NonNull fragment: Fragment, @Nullable tag: String): FragmentTransaction
open fun add(@IdRes containerViewId: Int, @NonNull fragment: Fragment, @Nullable tag: String): FragmentTransaction
fun add(@IdRes containerViewId: Int, @NonNull fragmentClass: Class<out Fragment>, @Nullable args: Bundle, @Nullable tag: String): FragmentTransaction
Add a fragment to the activity state.
Link copied to clipboard
Used with custom Transitions to map a View from a removed or hidden Fragment to a View from a shown or added Fragment.
Link copied to clipboard
Add this transaction to the back stack.
Link copied to clipboard
Like commit but allows the commit to be executed after an activity's state is saved.
Link copied to clipboard
Commits this transaction synchronously.
Link copied to clipboard
Like commitNow but allows the commit to be executed after an activity's state is saved.
Link copied to clipboard
Disallow calls to addToBackStack.
Link copied to clipboard
Returns true if this FragmentTransaction is allowed to be added to the back stack.
Link copied to clipboard
fun replace(@IdRes containerViewId: Int, @NonNull fragmentClass: Class<out Fragment>, @Nullable args: Bundle): FragmentTransaction
Calls replace with a null tag.
open fun replace(@IdRes containerViewId: Int, @NonNull fragment: Fragment, @Nullable tag: String): FragmentTransaction
fun replace(@IdRes containerViewId: Int, @NonNull fragmentClass: Class<out Fragment>, @Nullable args: Bundle, @Nullable tag: String): FragmentTransaction
Replace an existing fragment that was added to a container.
Link copied to clipboard
Add a Runnable to this transaction that will be run after this transaction has been committed.
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Set the short title to show as a bread crumb when this transaction is on the back stack.
Like setBreadCrumbShortTitle but taking a raw string; this method is not recommended, as the string can not be changed later if the locale changes.
Link copied to clipboard
Set the full title to show as a bread crumb when this transaction is on the back stack.
Like setBreadCrumbTitle but taking a raw string; this method is not recommended, as the string can not be changed later if the locale changes.
Link copied to clipboard
open fun setCustomAnimations(@AnimatorRes @AnimRes enter: Int, @AnimatorRes @AnimRes exit: Int): FragmentTransaction
open fun setCustomAnimations(@AnimatorRes @AnimRes enter: Int, @AnimatorRes @AnimRes exit: Int, @AnimatorRes @AnimRes popEnter: Int, @AnimatorRes @AnimRes popExit: Int): FragmentTransaction
Set specific animation resources to run for the fragments that are entering and exiting in this transaction.
Link copied to clipboard
open fun setMaxLifecycle(@NonNull fragment: Fragment, @NonNull state: Lifecycle.State): FragmentTransaction
Set a ceiling for the state of an active fragment in this FragmentManager.
Link copied to clipboard
Set a currently active fragment in this FragmentManager as the primary navigation fragment.
Link copied to clipboard
Sets whether or not to allow optimizing operations within and across transactions.
Link copied to clipboard
Select a standard transition animation for this transaction.
Link copied to clipboard
Set a custom style resource that will be used for resolving transit animations.